

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Operacao</title>
    </head>
    <body>
        <div class="nav">
           
            <span class="menuButton"><g:link class="list" action="list">Operacao List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Operacao</g:link></span>
        </div>
        <div class="body">
            <h1>Show Operacao</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
					
						 <tr class="prop">
                            <td valign="top" class="name">Data Operacao:</td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${operacao.dataOperacao.time}" /></td>
                            
                        </tr>
						  <tr class="prop">
                            <td valign="top" class="name">Cliente:</td>
                            
                            <td valign="top" class="value"><g:link controller="cliente" action="show" id="${operacao?.cliente?.id}">${operacao?.cliente.nome}</g:link></td>
                            
                        </tr>
                               
                        <tr class="prop">
                            <td valign="top" class="name">Cheques:</td>
                            
                            <td  valign="top" style="text-align:left;" class="value">
							
							
							
								<table>
				                    <thead>
				                        <tr>
				                   	        <th>Data Entrada</th>
				                   	        <th>Data Vencimento</th>
				                   	        <th>Emitente</th>
				                   	        <th>Numero</th>
				                   	        <th>Valor</th>
											<th>Valor L�quido</th>
				                        </tr>
				                    </thead>
				                    <tbody>
				                    <g:each in="${operacao.cheques}" status="i" var="cheque">
				                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">                 
				                            <td><g:formatDate format="dd-MM-yyyy" date="${cheque.dataEntrada.time}" /></td>
				                            <td><g:formatDate format="dd-MM-yyyy" date="${cheque.dataVencimento.time}" /></td>
				                            <td>${cheque.emitente?.nomePessoa.encodeAsHTML()}</td>
				                            <td>${cheque.numero?.encodeAsHTML()}</td>
				                            <td>${cheque.valor?.encodeAsHTML()}</td>
											<td>${cheque.valorLiquido?.encodeAsHTML()}</td>
								         </tr>
				                    </g:each>
				                    </tbody>
								</table>
							
							
							
                                <!--<ul>
                                <g:each var="c" in="${operacao.cheques}">
                                    <li><g:link controller="cheque" action="show" id="${c.id}">${c}</g:link></li>
                                </g:each>
                                </ul>-->
                            </td>
                            
                        </tr>
                    
                      
                    
                       
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <input type="hidden" name="id" value="${operacao?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Tem certeza?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
